from rest_framework.serializers import ModelSerializer
from majing import models


class CartSerializer(ModelSerializer):
    """
    购物车序列化器
    """
    class Meta:
        model = models.CourseExplain
        fields = [
            'id',
            'expire_time',
            'expire_text',
            'price'
        ]